package cc.wanforme.st.server.base.service;

import cc.wanforme.st.server.authen.dto.UserRoleAuth;
import cc.wanforme.st.server.base.entity.User;

import org.springframework.lang.Nullable;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author wanne
 * @since 2023-01-03
 */
public interface IUserService extends IService<User> {

	UserRoleAuth selectAuthenticationsByUser(long userId) ;
	
	UserRoleAuth selectAuthenticationsByToken(String token) ;
	
	User selectUserByToken(String token);
	
	/** 用户名查询*/
	User selectByUsername(String username);
	
	User saveVo(User vo);
	
	void updateVo(User vo);
	
	void deleteUser(String id);
	
	void resetPassword(String userId, String password);
	
	PageInfo<User> searchUsers(int page, int pageSize, 
			@Nullable String name, @Nullable String username, @Nullable String status);

	void resetPwd(Long id, String password);
}
